package com.seuic.hnjiningposapp.hnapps.ui.view.dialog;

import android.content.Context;

import androidx.annotation.NonNull;

import com.lxj.xpopup.core.CenterPopupView;

import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * CenterPopupView
 * 弹窗（基类封装）
 *
 * @author lucifer
 */
public class BaseCenterPopupView extends CenterPopupView {

    private Unbinder bind;

    public BaseCenterPopupView(@NonNull Context context) {
        super(context);
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        bind = ButterKnife.bind(this);
    }

    @Override
    protected void onDismiss() {
        super.onDismiss();
        if (bind != null && bind != Unbinder.EMPTY) {
            bind.unbind();
        }
        this.bind = null;
    }
}
